﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace Platform.Linq
{
	public class QueryProviderBase : IQueryProvider
	{
		#region IQueryProvider Members

		public IQueryable<TElement> CreateQuery<TElement>( Expression expression )
		{
			throw new NotImplementedException();
		}

		public IQueryable CreateQuery( Expression expression )
		{
			throw new NotImplementedException();
		}

		public TResult Execute<TResult>( Expression expression )
		{
			throw new NotImplementedException();
		}

		public object Execute( Expression expression )
		{
			throw new NotImplementedException();
		}

		#endregion
	}

	public class QueryTranslator : ExpressionVisitor
	{

		public QueryTranslator( QueryProviderBase provider )
		{
			this.Provider = provider;
		}

		public QueryProviderBase Provider
		{ get; private set; }
	}

	/// <summary>
	/// Representa uma condição para fazer o filtro na coleção
	/// </summary>
	public class FilterExpression
	{

		/// <summary>
		/// Condição adicionada no filtro where
		/// </summary>
		public Expression Condition
		{ get; private set; }
	}

	public class ProjectionExpression
	{

	}

	public class DataSourceExpression
	{

	}
}
